<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>担保交友推荐 - 安全社交平台</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary: #4f46e5;
            --primary-light: #f0f9ff;
            --secondary: #64748b;
            --light: #f8fafc;
            --dark: #1e293b;
            --success: #10b981;
            --danger: #ef4444;
            --warning: #f59e0b;
            --border: #e2e8f0;
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
            --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
        }
        
        body {
            font-family: 'Inter', system-ui, sans-serif;
            background-color: #f5f7ff;
            color: var(--dark);
            line-height: 1.6;
        }
        
        .navbar {
            box-shadow: var(--shadow);
            background-color: white;
        }
        
        .container {
            padding: 2rem 0;
        }
        
        .section-header {
            margin-bottom: 2rem;
            position: relative;
        }
        
        .section-title {
            font-weight: 700;
            margin-bottom: 0.5rem;
            color: var(--dark);
            position: relative;
            display: inline-block;
        }
        
        .section-title::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 50px;
            height: 3px;
            background-color: var(--primary);
            border-radius: 3px;
        }
        
        .section-description {
            color: var(--secondary);
            max-width: 800px;
        }
        
        .filter-bar {
            background-color: white;
            border-radius: 0.75rem;
            padding: 1rem;
            margin-bottom: 2rem;
            box-shadow: var(--shadow);
        }
        
        .filter-options {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            align-items: center;
        }
        
        .filter-group {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .filter-label {
            font-weight: 500;
            color: var(--dark);
        }
        
        .card {
            border: none;
            border-radius: 0.75rem;
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            background-color: white;
            margin-bottom: 1.5rem;
        }
        
        .card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-hover);
        }
        
        .guarantee-badge {
            position: absolute;
            top: 1rem;
            left: 1rem;
            background-color: var(--primary);
            color: white;
            padding: 0.25rem 0.75rem;
            border-radius: 999px;
            font-size: 0.85rem;
            font-weight: 500;
            z-index: 10;
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        /* 布局1: 标准卡片式 */
        .card-standard .card-img-container {
            position: relative;
            height: 200px;
            overflow: hidden;
        }
        
        .card-standard .card-img-top {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }
        
        .card-standard:hover .card-img-top {
            transform: scale(1.05);
        }
        
        .card-standard .card-body {
            padding: 1.25rem;
        }
        
        /* 布局2: 无图片卡片 */
        .card-no-image {
            border-left: 4px solid var(--primary);
        }
        
        .card-no-image .card-body {
            padding: 1.5rem;
        }
        
        /* 布局3: 多图网格卡片 */
        .card-multi-image .image-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            grid-template-rows: repeat(2, 1fr);
            gap: 4px;
            height: 200px;
            position: relative;
        }
        
        .card-multi-image .grid-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .card-multi-image .image-count {
            position: absolute;
            bottom: 8px;
            right: 8px;
            background-color: rgba(0, 0, 0, 0.6);
            color: white;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            font-weight: 500;
        }
        
        /* 布局4: 大型展示卡片 */
        .card-large {
            display: flex;
            flex-direction: column;
        }
        
        @media (min-width: 768px) {
            .card-large {
                flex-direction: row;
                height: 300px;
            }
        }
        
        .card-large .card-img-container {
            position: relative;
            flex: 1;
            min-height: 200px;
        }
        
        .card-large .card-img-top {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .card-large .card-body {
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        
        /* 用户信息 */
        .user-info {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
        }
        
        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid white;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        
        .user-details {
            flex: 1;
        }
        
        .user-name {
            font-weight: 600;
            font-size: 1rem;
            margin-bottom: 0;
        }
        
        .user-meta {
            font-size: 0.8rem;
            color: var(--secondary);
        }
        
        /* 卡片内容 */
        .card-title {
            font-weight: 600;
            margin-bottom: 0.5rem;
            transition: color 0.2s;
        }
        
        .card:hover .card-title {
            color: var(--primary);
        }
        
        .card-text {
            color: var(--secondary);
            font-size: 0.9rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin-bottom: 1rem;
        }
        
        .card-large .card-text {
            -webkit-line-clamp: 3;
            margin-bottom: auto;
        }
        
        .tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }
        
        .tag {
            padding: 0.25rem 0.75rem;
            border-radius: 999px;
            font-size: 0.75rem;
            background-color: var(--primary-light);
            color: var(--primary);
        }
        
        /* 互动数据 */
        .card-metrics {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.85rem;
            color: var(--secondary);
            padding-top: 0.75rem;
            border-top: 1px solid var(--border);
        }
        
        .metric {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .card-actions {
            display: flex;
            gap: 1rem;
        }
        
        .action-btn {
            background: none;
            border: none;
            color: var(--secondary);
            display: flex;
            align-items: center;
            gap: 0.25rem;
            font-size: 0.85rem;
            cursor: pointer;
            transition: color 0.2s;
            padding: 0.25rem 0.5rem;
            border-radius: 0.25rem;
        }
        
        .action-btn:hover {
            color: var(--primary);
            background-color: var(--primary-light);
        }
        
        .action-btn.liked {
            color: var(--danger);
        }
        
        .action-btn.saved {
            color: var(--primary);
        }
        
        /* 布局切换器 */
        .layout-switcher {
            display: flex;
            gap: 0.5rem;
            margin-left: auto;
        }
        
        .layout-btn {
            width: 36px;
            height: 36px;
            border-radius: 0.5rem;
            border: 1px solid var(--border);
            background-color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .layout-btn.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .layout-btn:hover:not(.active) {
            border-color: var(--primary);
            color: var(--primary);
        }
        
        /* 响应式调整 */
        @media (max-width: 768px) {
            .filter-options {
                flex-direction: column;
                align-items: stretch;
            }
            
            .layout-switcher {
                margin-left: 0;
                margin-top: 1rem;
                justify-content: flex-end;
            }
            
            .section-title {
                font-size: 1.5rem;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-light">
        <div class="container">
            <a class="navbar-brand" href="#">
                <i class="fas fa-shield-alt text-primary me-2"></i>安全社交
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="#">首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link active" href="#">担保交友</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">活动推荐</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">安全指南</a>
                    </li>
                </ul>
                <div class="d-flex align-items-center gap-3">
                    <button class="btn btn-outline-primary">登录</button>
                    <button class="btn btn-primary">注册</button>
                </div>
            </div>
        </div>
    </nav>
    
    <!-- 主要内容区 -->
    <div class="container">
        <!-- 页面标题 -->
        <div class="section-header">
            <h1 class="section-title">担保交友推荐</h1>
            <p class="section-description">所有推荐用户均经过平台实名认证和背景审核，为您提供安全可靠的社交体验</p>
        </div>
        
        <!-- 筛选栏 -->
        <div class="filter-bar">
            <div class="filter-options">
                <div class="filter-group">
                    <span class="filter-label">性别:</span>
                    <select class="form-select form-select-sm">
                        <option value="all">全部</option>
                        <option value="male">男</option>
                        <option value="female">女</option>
                    </select>
                </div>
                
                <div class="filter-group">
                    <span class="filter-label">年龄:</span>
                    <select class="form-select form-select-sm">
                        <option value="all">全部</option>
                        <option value="18-25">18-25岁</option>
                        <option value="26-35">26-35岁</option>
                        <option value="36-45">36-45岁</option>
                        <option value="45+">45岁以上</option>
                    </select>
                </div>
                
                <div class="filter-group">
                    <span class="filter-label">兴趣:</span>
                    <select class="form-select form-select-sm">
                        <option value="all">全部</option>
                        <option value="music">音乐</option>
                        <option value="sports">运动</option>
                        <option value="reading">阅读</option>
                        <option value="travel">旅行</option>
                        <option value="food">美食</option>
                    </select>
                </div>
                
                <div class="filter-group">
                    <span class="filter-label">排序:</span>
                    <select class="form-select form-select-sm">
                        <option value="recommended">推荐优先</option>
                        <option value="newest">最新加入</option>
                        <option value="popular">人气最高</option>
                    </select>
                </div>
                
                <div class="layout-switcher">
                    <button class="layout-btn active" title="网格布局">
                        <i class="fas fa-th"></i>
                    </button>
                    <button class="layout-btn" title="列表布局">
                        <i class="fas fa-list"></i>
                    </button>
                    <button class="layout-btn" title="混合布局">
                        <i class="fas fa-th-large"></i>
                    </button>
                </div>
            </div>
        </div>
        
        <!-- 推荐列表：多种布局 -->
        <div class="row">
            <!-- 布局1: 标准卡片式 -->
            <div class="col-lg-4 col-md-6">
                <div class="card card-standard">
                    <div class="card-img-container">
                        <div class="guarantee-badge">
                            <i class="fas fa-check"></i> 已认证
                        </div>
                        <img src="https://picsum.photos/600/400?random=1" alt="陈明亮的个人照片" class="card-img-top">
                    </div>
                    <div class="card-body">
                        <div class="user-info">
                            <img src="https://picsum.photos/100/100?random=101" alt="陈明亮的头像" class="user-avatar">
                            <div class="user-details">
                                <h5 class="user-name">陈明亮</h5>
                                <div class="user-meta">28岁 · 上海 · 设计师</div>
                            </div>
                        </div>
                        
                        <h5 class="card-title">寻找志同道合的摄影爱好者</h5>
                        <p class="card-text">喜欢街拍和风光摄影，希望能找到一起外拍、交流技巧的朋友，周末有空可以一起出去创作。</p>
                        
                        <div class="tags">
                            <span class="tag">摄影</span>
                            <span class="tag">旅行</span>
                            <span class="tag">艺术</span>
                        </div>
                        
                        <div class="card-metrics">
                            <div>
                                <span class="metric me-3"><i class="fas fa-eye"></i> 1.2k</span>
                                <span class="metric"><i class="fas fa-comment"></i> 32</span>
                            </div>
                            <div class="card-actions">
                                <button class="action-btn liked">
                                    <i class="fas fa-heart"></i> 128
                                </button>
                                <button class="action-btn">
                                    <i class="fas fa-bookmark"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 布局2: 无图片卡片 -->
            <div class="col-lg-4 col-md-6">
                <div class="card card-no-image">
                    <div class="card-body">
                        <div class="user-info">
                            <img src="https://picsum.photos/100/100?random=102" alt="林小雨的头像" class="user-avatar">
                            <div class="user-details">
                                <h5 class="user-name">林小雨</h5>
                                <div class="user-meta">25岁 · 北京 · 程序员</div>
                            </div>
                        </div>
                        
                        <h5 class="card-title">想认识喜欢读书和讨论的朋友</h5>
                        <p class="card-text">平时喜欢读科幻和历史类书籍，希望能找到可以一起讨论书中观点的朋友，偶尔可以组织线上读书会。</p>
                        
                        <div class="tags">
                            <span class="tag">阅读</span>
                            <span class="tag">科幻</span>
                            <span class="tag">历史</span>
                        </div>
                        
                        <div class="card-metrics">
                            <div>
                                <span class="metric me-3"><i class="fas fa-eye"></i> 856</span>
                                <span class="metric"><i class="fas fa-comment"></i> 24</span>
                            </div>
                            <div class="card-actions">
                                <button class="action-btn">
                                    <i class="fas fa-heart"></i> 76
                                </button>
                                <button class="action-btn saved">
                                    <i class="fas fa-bookmark"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 布局3: 多图网格卡片 -->
            <div class="col-lg-4 col-md-6">
                <div class="card card-multi-image">
                    <div class="image-grid">
                        <div class="guarantee-badge">
                            <i class="fas fa-check"></i> 已认证
                        </div>
                        <img src="https://picsum.photos/300/300?random=2" alt="户外活动照片1" class="grid-img">
                        <img src="https://picsum.photos/300/300?random=3" alt="户外活动照片2" class="grid-img">
                        <img src="https://picsum.photos/300/300?random=4" alt="户外活动照片3" class="grid-img">
                        <img src="https://picsum.photos/300/300?random=5" alt="户外活动照片4" class="grid-img">
                        <div class="image-count">+8</div>
                    </div>
                    <div class="card-body">
                        <div class="user-info">
                            <img src="https://picsum.photos/100/100?random=103" alt="王大山的头像" class="user-avatar">
                            <div class="user-details">
                                <h5 class="user-name">王大山</h5>
                                <div class="user-meta">32岁 · 广州 · 户外教练</div>
                            </div>
                        </div>
                        
                        <h5 class="card-title">寻找喜欢户外探险的伙伴</h5>
                        <p class="card-text">热爱登山、露营和徒步，每月都会组织户外活动，欢迎新手加入，会提供专业指导。</p>
                        
                        <div class="tags">
                            <span class="tag">户外</span>
                            <span class="tag">登山</span>
                            <span class="tag">露营</span>
                        </div>
                        
                        <div class="card-metrics">
                            <div>
                                <span class="metric me-3"><i class="fas fa-eye"></i> 2.1k</span>
                                <span class="metric"><i class="fas fa-comment"></i> 58</span>
                            </div>
                            <div class="card-actions">
                                <button class="action-btn liked">
                                    <i class="fas fa-heart"></i> 215
                                </button>
                                <button class="action-btn">
                                    <i class="fas fa-bookmark"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 布局4: 大型展示卡片 (跨两列) -->
            <div class="col-lg-8">
                <div class="card card-large">
                    <div class="card-img-container">
                        <div class="guarantee-badge">
                            <i class="fas fa-check"></i> 已认证
                        </div>
                        <img src="https://picsum.photos/800/600?random=6" alt="张悦的个人照片和音乐场景" class="card-img-top">
                    </div>
                    <div class="card-body">
                        <div class="user-info">
                            <img src="https://picsum.photos/100/100?random=104" alt="张悦的头像" class="user-avatar">
                            <div class="user-details">
                                <h5 class="user-name">张悦</h5>
                                <div class="user-meta">29岁 · 成都 · 音乐老师</div>
                            </div>
                        </div>
                        
                        <h5 class="card-title">组建小型室内乐组合，寻找音乐伙伴</h5>
                        <p class="card-text">专业小提琴演奏者，有10年教学经验。想组建一个小型室内乐组合，定期排练和小型演出。希望能找到大提琴、钢琴或中提琴演奏者，要求有一定演奏基础，热爱古典音乐，有团队合作精神。每周可固定排练一次，地点在市中心音乐工作室（免费使用）。</p>
                        
                        <div class="tags">
                            <span class="tag">古典音乐</span>
                            <span class="tag">小提琴</span>
                            <span class="tag">室内乐</span>
                            <span class="tag">音乐演出</span>
                        </div>
                        
                        <div class="card-metrics">
                            <div>
                                <span class="metric me-3"><i class="fas fa-eye"></i> 3.5k</span>
                                <span class="metric"><i class="fas fa-comment"></i> 94</span>
                            </div>
                            <div class="card-actions">
                                <button class="action-btn liked">
                                    <i class="fas fa-heart"></i> 326
                                </button>
                                <button class="action-btn saved">
                                    <i class="fas fa-bookmark"></i>
                                </button>
                                <button class="action-btn btn btn-primary btn-sm ms-2">
                                    <i class="fas fa-user-plus"></i> 联系TA
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 继续添加不同布局的卡片 -->
            <div class="col-lg-4 col-md-6">
                <div class="card card-standard">
                    <div class="card-img-container">
                        <div class="guarantee-badge">
                            <i class="fas fa-check"></i> 已认证
                        </div>
                        <img src="https://picsum.photos/600/400?random=7" alt="刘思远的烹饪照片" class="card-img-top">
                    </div>
                    <div class="card-body">
                        <div class="user-info">
                            <img src="https://picsum.photos/100/100?random=105" alt="刘思远的头像" class="user-avatar">
                            <div class="user-details">
                                <h5 class="user-name">刘思远</h5>
                                <div class="user-meta">35岁 · 杭州 · 美食博主</div>
                            </div>
                        </div>
                        
                        <h5 class="card-title">寻找美食爱好者一起探店</h5>
                        <p class="card-text">喜欢尝试各种美食，经常探访城市里的特色餐馆，希望找到同样热爱美食的朋友一起探店、交流。</p>
                        
                        <div class="tags">
                            <span class="tag">美食</span>
                            <span class="tag">探店</span>
                            <span class="tag">烹饪</span>
                        </div>
                        
                        <div class="card-metrics">
                            <div>
                                <span class="metric me-3"><i class="fas fa-eye"></i> 1.8k</span>
                                <span class="metric"><i class="fas fa-comment"></i> 47</span>
                            </div>
                            <div class="card-actions">
                                <button class="action-btn">
                                    <i class="fas fa-heart"></i> 156
                                </button>
                                <button class="action-btn">
                                    <i class="fas fa-bookmark"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="col-lg-4 col-md-6">
                <div class="card card-no-image">
                    <div class="card-body">
                        <div class="user-info">
                            <img src="https://picsum.photos/100/100?random=106" alt="赵晓雯的头像" class="user-avatar">
                            <div class="user-details">
                                <h5 class="user-name">赵晓雯</h5>
                                <div class="user-meta">27岁 · 深圳 · 瑜伽教练</div>
                            </div>
                        </div>
                        
                        <h5 class="card-title">组织公益瑜伽活动，寻找参与者</h5>
                        <p class="card-text">每周日上午在公园组织免费瑜伽课程，适合初学者，希望能认识更多喜欢瑜伽和健康生活的朋友。</p>
                        
                        <div class="tags">
                            <span class="tag">瑜伽</span>
                            <span class="tag">健康</span>
                            <span class="tag">公益</span>
                        </div>
                        
                        <div class="card-metrics">
                            <div>
                                <span class="metric me-3"><i class="fas fa-eye"></i> 1.5k</span>
                                <span class="metric"><i class="fas fa-comment"></i> 36</span>
                            </div>
                            <div class="card-actions">
                                <button class="action-btn liked">
                                    <i class="fas fa-heart"></i> 189
                                </button>
                                <button class="action-btn saved">
                                    <i class="fas fa-bookmark"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="col-lg-4 col-md-6">
                <div class="card card-multi-image">
                    <div class="image-grid">
                        <div class="guarantee-badge">
                            <i class="fas fa-check"></i> 已认证
                        </div>
                        <img src="https://picsum.photos/300/300?random=8" alt="绘画作品1" class="grid-img">
                        <img src="https://picsum.photos/300/300?random=9" alt="绘画作品2" class="grid-img">
                        <img src="https://picsum.photos/300/300?random=10" alt="绘画作品3" class="grid-img">
                        <img src="https://picsum.photos/300/300?random=11" alt="绘画作品4" class="grid-img">
                        <div class="image-count">+5</div>
                    </div>
                    <div class="card-body">
                        <div class="user-info">
                            <img src="https://picsum.photos/100/100?random=107" alt="孙艺的头像" class="user-avatar">
                            <div class="user-details">
                                <h5 class="user-name">孙艺</h5>
                                <div class="user-meta">31岁 · 南京 · 插画师</div>
                            </div>
                        </div>
                        
                        <h5 class="card-title">寻找绘画爱好者交流创作经验</h5>
                        <p class="card-text">自由插画师，擅长水彩和数字绘画，希望找到同样喜欢绘画的朋友，互相学习，共同进步。</p>
                        
                        <div class="tags">
                            <span class="tag">绘画</span>
                            <span class="tag">插画</span>
                            <span class="tag">艺术</span>
                        </div>
                        
                        <div class="card-metrics">
                            <div>
                                <span class="metric me-3"><i class="fas fa-eye"></i> 1.3k</span>
                                <span class="metric"><i class="fas fa-comment"></i> 29</span>
                            </div>
                            <div class="card-actions">
                                <button class="action-btn">
                                    <i class="fas fa-heart"></i> 104
                                </button>
                                <button class="action-btn">
                                    <i class="fas fa-bookmark"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 加载更多 -->
        <div class="text-center mt-4">
            <button class="btn btn-outline-primary">
                <i class="fas fa-refresh me-2"></i>加载更多推荐
            </button>
        </div>
    </div>
    
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 布局切换功能
            const layoutButtons = document.querySelectorAll('.layout-btn');
            const cardContainer = document.querySelector('.row');
            
            layoutButtons.forEach(button => {
                button.addEventListener('click', function() {
                    // 移除所有按钮的活跃状态
                    layoutButtons.forEach(btn => btn.classList.remove('active'));
                    // 添加当前按钮的活跃状态
                    this.classList.add('active');
                    
                    // 这里可以根据需要修改卡片布局
                    if (this.title === '列表布局') {
                        cardContainer.classList.add('list-layout');
                        // 调整卡片宽度为100%
                        document.querySelectorAll('.col-lg-4, .col-lg-8').forEach(col => {
                            col.className = 'col-12';
                        });
                    } else if (this.title === '网格布局') {
                        cardContainer.classList.remove('list-layout');
                        // 恢复原始网格布局
                        resetGridLayout();
                    } else if (this.title === '混合布局') {
                        cardContainer.classList.remove('list-layout');
                        // 保持混合布局
                        resetGridLayout();
                    }
                });
            });
            
            // 重置网格布局
            function resetGridLayout() {
                const columns = document.querySelectorAll('.row > div');
                columns.forEach((col, index) => {
                    if (index === 3) { // 大型卡片
                        col.className = 'col-lg-8';
                    } else {
                        col.className = 'col-lg-4 col-md-6';
                    }
                });
            }
            
            // 点赞功能
            const likeButtons = document.querySelectorAll('.action-btn:not(.saved)');
            likeButtons.forEach(button => {
                if (button.querySelector('.fas.fa-heart')) {
                    button.addEventListener('click', function() {
                        this.classList.toggle('liked');
                        const countElement = this.childNodes[2].textContent.trim();
                        let count = parseInt(countElement);
                        
                        if (this.classList.contains('liked')) {
                            this.childNodes[2].textContent = ` ${count + 1}`;
                        } else {
                            this.childNodes[2].textContent = ` ${count - 1}`;
                        }
                    });
                }
            });
            
            // 收藏功能
            const saveButtons = document.querySelectorAll('.action-btn:has(.fas.fa-bookmark)');
            saveButtons.forEach(button => {
                button.addEventListener('click', function() {
                    this.classList.toggle('saved');
                });
            });
            
            // 联系按钮功能
            const contactButtons = document.querySelectorAll('.action-btn.btn-primary');
            contactButtons.forEach(button => {
                button.addEventListener('click', function() {
                    const userName = this.closest('.card').querySelector('.user-name').textContent;
                    alert(`正在打开与 ${userName} 的聊天窗口...`);
                });
            });
            
            // 加载更多功能
            const loadMoreBtn = document.querySelector('.btn-outline-primary:not(.navbar .btn-outline-primary)');
            loadMoreBtn.addEventListener('click', function() {
                this.innerHTML = '<i class="fas fa-spinner fa-spin me-2"></i>加载中...';
                
                // 模拟加载延迟
                setTimeout(() => {
                    this.innerHTML = '<i class="fas fa-refresh me-2"></i>加载更多推荐';
                    alert('已加载全部推荐内容');
                }, 1500);
            });
        });
    </script>
</body>
</html>
    
